module.exports = function (sequelize, DataTypes) {
    const Feedback = sequelize.define('Feedback', {
        content: {
            type: DataTypes.STRING,
            allowNull: false,
            comment: '反馈内容'
        },
        createdUserId: {
            type: DataTypes.INTEGER,
            allowNull: false,
            comment: '反馈人Id'
        },
        createdUserName: {
            type: DataTypes.STRING,
            allowNull: false,
            comment: '反馈人姓名'
        },
        source: {
            type: DataTypes.STRING,
            allowNull: false,
            defaultValue: 'zfb',
            comment: '来源(微信小程序或者其他小程序，例: 微信wx 支付宝zfb)'
        }
    }, {
        timestamps: true, //createAt updateAt是否显示
        createdAt: "createdTime", // 将createdAt设为自定义字段createdTime
        updatedAt: "updatedTime"
    })

    return Feedback
}

